Querying Source Code Using an Algebraic Query Language
نویسندگان
چکیده
Querying and analyzing source code interactively is a critical task in reverse engineering and program understanding. Current source code query systems lack suucient formalism and ooer limited query capabilities. In this paper, we introduce the formal framework of Source Code Algebra (SCA), and outline a source code query system based on it. SCA provides a formal data model for source code, an algebraic expression-based query language, and opportunities for query optimization. An algebraic model of source code addresses the issues of conceptual integrity , expressive power, and performance of a source code query system within a uniied framework. 1 Overview The answers are in the source code. Mark Weiser, in Source Code 28]. Software reverse engineering, code re-engineering, and program understanding have begun to emerge as the latest challenges in the eld of software engineering. Interest in these areas stems from the need to maintain extremely large, old, and unwieldy software systems (also called legacy systems), which for reasons of economics cannot be thrown away and rewritten. An early conclusion in this area of study is that a complete automation of the reverse engineering process is not feasible 8]. It is felt that the reverse engineering of real systems must involve substantial human participation. This acceptance, in turn, leads to a critical need for software tools that can assist or support the human reverse engineers in their task. An essential component in a reverse engineer's toolkit must be a tool to query source code interactively. It is widely accepted that in legacy systems, the source code is the only true documentation of program structure and behavior 20, 24]. Recovering the design of a such a system will necessarily involve close and careful scrutiny of its source code. The need for source code query tools has been articulated by Biggerstaa in terms of a \conceptual grep" 2]. The purpose of a source code querying tool is to help human reverse engineers indulge in plausible reasoning 2] or domain bridging 3] | an iterative process of guesswork and veriication that leads them to a better understanding of what the source code is doing. A reverse engineer may pose queries pertaining to diierent views of the source code. One view is based on composition relationships. This includes queries related to global structural information, e.g., composition relations between program entities such as les, functions, variables, types, etc. Queries can also be based on statement-level …
منابع مشابه
Supporting Queries on Source Code: a Formal Framework
Querying source code interactively for information is a critical task in reverse engineering of software. However, current source code query systems succeed in handling only small subsets of the wide range of queries possible on code, trading generality and expressive power for ease of implementation and practicality. We attribute this to the absence of clean formalisms for modeling and queryin...
متن کاملDeveloping a BIM-based Spatial Ontology for Semantic Querying of 3D Property Information
With the growing dominance of complex and multi-level urban structures, current cadastral systems, which are often developed based on 2D representations, are not capable of providing unambiguous spatial information about urban properties. Therefore, the concept of 3D cadastre is proposed to support 3D digital representation of land and properties and facilitate the communication of legal owners...
متن کاملQuerying Software Abstraction Graphs
The analysis of software is supported by query languages, that work directly on the source code or on some of its abstractions. This paper presents the Graph Repository Query Language (GReQL) that works on TGraphs as underlying data structures. The key concepts of the language are described as well as the evaluation and optimization of GReQL queries. The paper concludes with a description of qu...
متن کاملSource-code queries with graph databases - with application to programming language usage and evolution
Program querying and analysis tools are of growing importance, and occur in two main variants. Firstly there are source-code query languages which help software engineers to explore a system, or to find code in need of refactoring as coding standards evolve. These also enable language designers to understand the practical uses of language features and idioms over a software corpus. Secondly the...
متن کاملExample-based Program Querying
Program query languages are an essential component of program analysis and manipulation systems. In each such system, a query identifies the source-code parts of interest by reasoning over a program representation that is dedicated to the intent of the system (e.g. call-graphs to detect behavioral flaws, abstract syntax trees for refactorings, concrete source code to verify programming conventi...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994